package com.toc.lib;
import com.toc.lib.exception.AppException;
import com.toc.lib.exception.SysException;
public class ExceptionHelper {
public static GenericException parse(Exception e) {
try {
e.printStackTrace();
return new SysException(null,null);
} catch(Exception ex) {
ex.printStackTrace();
return new SysException(null,null);
}
}
public static void log(Exception e) {
try {
e.printStackTrace();
} catch(Exception ex) {
}
}
public static AppException raise(String errorCode, String errorInformation) {
//TODO: Remove it when test is done
System.out.println(errorInformation);
return new AppException(errorCode,errorInformation);
}
}